package com.qfjy.service.impl.example1;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * #TODO 邮件进行发送
 */
@Service
@Slf4j
public class EmailServiceImpl {


    @Value("${server.port}")
    private int port;
    /**
     * 监听MQ 队列的名称
     * @param cardId
     */
    @RabbitListener(queues = {"emailQueue"})
    public void sendEmail(String cardId){

        log.info("邮件发送成功--》工资明细-->{},==>{}",cardId,port);

    }

}
